package com.aspectj;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.aspectj.config.AppConfig;
import com.aspectj.service.AopService;

/**
* @author blue demon
* @date 2020/02/10
*/
/**
 * 两个通知下
doBeforeGame
doBeforeGame2
字母哥上场打球了！！
doAfterGame2
返回通知：BrokerAspect2
doAfterGame
返回通知：BrokerAspect

Arround与其他并存
环绕通知开始：doArroundGame
doBeforeGame
字母哥上场打球了！！
环绕通知结束：doArroundGame
doAfterGame
返回通知：BrokerAspect
 * @author Administrator
 *
 */
public class SummerAopDemoApplication {
    public static void main(String[] args) {
    	AnnotationConfigApplicationContext ctx=new AnnotationConfigApplicationContext();
    	ctx.register(AppConfig.class);
    	ctx.refresh();
    	AopService aopService=ctx.getBean(AopService.class);
    	aopService.Curry();
    	//System.out.println("---------------------");
    	//UserService userService=ctx.getBean(UserService.class);
    	//System.out.println(userService.save("nxnx"));
    	ctx.close();
    }
}